# Contributor: Orion <systmkor@gmail.com>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=xclip
pkgver=0.13
pkgrel=1
pkgdesc="Command line interface to the X11 clipboard"
url="https://github.com/astrand/xclip"
arch="all"
license="GPL-2.0-or-later"
makedepends="autoconf automake libxmu-dev libx11-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/astrand/xclip/archive/$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
	install -m644 README ChangeLog \
		"$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="191a86194a1503a47c6641a55855dc4aaa8c2c99d2e6f1d46e727feec85a6639041f37ec2265c05c178c0c7d791d3e88bde89223f879effa878812f078485ed2  xclip-0.13.tar.gz"
